package cn.picclife.mwx.manager.sys.mapper;

import java.util.List;
import java.util.Map;

import cn.picclife.mwx.common.core.dao.MyBatisRepositoryAnnotation;
import cn.picclife.mwx.manager.sys.model.bo.BranchDataAuthBo;
import cn.picclife.mwx.manager.sys.model.bo.CommonBo;
import cn.picclife.mwx.manager.sys.model.bo.OperatorMenuInfo;
import cn.picclife.mwx.manager.sys.model.bo.PageCount;
import cn.picclife.mwx.manager.sys.model.bo.User;
import cn.picclife.mwx.manager.sys.model.bo.UserSessionBo;
import cn.picclife.mwx.manager.sys.model.po.DataAuth;
import cn.picclife.mwx.manager.sys.model.po.DataAuthType;
import cn.picclife.mwx.manager.sys.model.po.Enum;
import cn.picclife.mwx.manager.sys.model.po.Operator;
/**
 * @ClassName: OperatorMapper
 * @Description:用户操作mapper
 * @author hui
 * @date: 2016年12月9日 下午2:17:03 <br/>
 */
@MyBatisRepositoryAnnotation
public interface OperatorMapper {
    int deleteByPrimaryKey(CommonBo commonBo);
    int deleteById(String optNo);
    int insert(Operator record);
    int insertSelective(Operator record);
    Operator selectByPrimaryKey(String optNo);
    int updateByPrimaryKeySelective(Operator record);
    int updateByOptNo(Operator operator);
    int updateByPrimaryKey(Operator record);
    Operator selectByOptnoAndPwd(String optNo,String password);
    List<OperatorMenuInfo> queryUserMenuList(Operator user);
    List<BranchDataAuthBo> queryUserDeptList(String deptNo);//查询用户机构列表
    List<BranchDataAuthBo>  queryUserDeptStubList(String deptNo);//查询子机构信息
    DataAuthType queryAuthType();
    List<User> queryUser(PageCount pageCount);
    int deleteOperatorRoles(CommonBo commonBo);
    int deleteUserBranchs(CommonBo commonBo);
    int addUserDataAuth(List<DataAuth> dataAuths);//用户添加权限
    int deleteUserDept(String optNo);//删除用户之前选中的机构
    List<Map<String, Object>> getUserDataAuth(String userNo,String optNo);//根据登录名获取用户当前数据权限
    List<String> getUserDept(String optNo);//获取用户机构List
    int queryUserAllCount(Map map);//查询满足条件的用户总数
    Operator selectUserDetail(String optNo);
	int queryUserRolesAllCount(Map<String, Object> object);//查询用户角色列表总数
	List<Map<String, Object>> queryUserRoles(PageCount pageCount);//查询用户角色列表
	List<String> queryBranchList(String opt_no);
	UserSessionBo queryBranchByOptNo(String optNo);//查询机构信息
	List<Enum> queryEnumInfo(String enumType);//查询枚举信息
	String queryOptId(Object object);
	List<Enum> queryOptType();
	List<BranchDataAuthBo> queryUserDeptStubListAuth(String branchId, String opt_no);
	List<BranchDataAuthBo> queryUserDeptListAuth(String branchId, String opt_no);
}